//
//  LTView.m
//  UI3_LTView
//
//  Created by dllo on 15/12/16.
//  Copyright © 2015年 lanou3g. All rights reserved.
//

#import "LTView.h"

@implementation LTView


- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self createLTview];
    }
    
    return self;
    
}

- (void)createLTview {
    
    self.myLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 50)];
    self.myLabel.backgroundColor = [UIColor clearColor];
    
    // 文本对齐
    self.myLabel.textAlignment = NSTextAlignmentCenter;
    
    // 设置字体
    self.myLabel.font = [UIFont systemFontOfSize:20];
    
    // 添加到LTView上
    [self addSubview:self.myLabel];
    [_myLabel release];
    
    
    // 右TextField
    
    self.myTextField = [[UITextField alloc] initWithFrame:CGRectMake(100, 0, 200, 50)];
    self.myTextField.backgroundColor = [UIColor clearColor];
    // 自定义边框
    self.myTextField.layer.borderWidth = 2;
    self.myTextField.layer.borderColor = [UIColor lightGrayColor].CGColor;
    self.myTextField.layer.cornerRadius = 5;
    // 删除按键
    self.myTextField.clearButtonMode = UITextFieldViewModeAlways;
    self.myTextField.clearsOnBeginEditing = YES;
    // 字体
    self.myTextField.font = [UIFont systemFontOfSize:20];

    [self addSubview:self.myTextField];
    [self.myTextField release];
}





@end
